import request from '@/config/axios'

export interface WeTagsVO {
        tagId: string
        groupId: string
        name: string
        order: number
}

// 查询标签列表
export const getWeTagsPage = async (params) => {
    return await request.get({url: `/wecom/we-tags/page`, params})
}

// 查询标签详情
export const getWeTags = async (id: number) => {
    return await request.get({url: `/wecom/we-tags/get?id=` + id})
}

// 新增标签
export const createWeTags = async (data: WeTagsVO) => {
    return await request.post({url: `/wecom/we-tags/create`, data})
}

// 修改标签
export const updateWeTags = async (data: WeTagsVO) => {
    return await request.put({url: `/wecom/we-tags/update`, data})
}

// 删除标签
export const deleteWeTags = async (id: number) => {
    return await request.delete({url: `/wecom/we-tags/delete?id=` + id})
}

// 导出标签 Excel
export const exportWeTags = async (params) => {
    return await request.download({url: `/wecom/we-tags/export-excel`, params})
}